//package com.example.demo.service;
//
//import org.springframework.amqp.rabbit.annotation.Exchange;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.QueueBinding;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.stereotype.Service;
//
//@Service
//public class MyRabbitListener {
//
//    @RabbitListener(bindings = @QueueBinding(
//            value=@Queue(name="buka.queue1"),
//            exchange = @Exchange(name="direct.exchange",type="direct"),
//            key = {"red","yellow"}
//    ))
//    public void onMessage1(String message) {
//        System.out.println("消费者1：" + message);
//    }
//
//
//
//    @RabbitListener()
//    public void onMessage2(String message) {
//        System.out.println("消费者2：" + message);
//    }
//
//
//
//}
